using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ARStructTypeInfo(Name = "ARFieldValueList", NumberOfMembers = 2u, MembersTypeString = "System.UInt32|ARValue"), ClassInterface, Guid("65122392-a1d6-48bc-b2d2-4704d2b6255a"), IDispatchImpl, ProgId("BMC.ARSystem.FieldValueList")]
	public class FieldValueList : DictionaryBase
	{
		public virtual object this[object fieldId]
		{
			get
			{
				return this[Convert.ToUInt32(fieldId)];
			}
			set
			{
				this.Add(Convert.ToUInt32(fieldId), value);
			}
		}
		public virtual object this[uint fieldId]
		{
			get
			{
				return base.get_Dictionary().get_Item(fieldId);
			}
			set
			{
				this.Add(fieldId, value);
			}
		}
		[ComVisible(false)]
		public virtual ICollection Keys
		{
			get
			{
				return base.get_Dictionary().get_Keys();
			}
		}
		public virtual ArrayList Fields
		{
			get
			{
				return new ArrayList(this.Keys);
			}
		}
		[ComVisible(false)]
		public virtual ICollection Values
		{
			get
			{
				return base.get_Dictionary().get_Values();
			}
		}
		public void Add(uint fieldId, object val, int arType)
		{
			if (val == null || (val is Keyword && (Keyword)val == 42))
			{
				val = DBNull.Value;
				arType = 0;
			}
			base.get_Dictionary().set_Item(fieldId, Util.ConvertFromARValue((object[])((val is Array) ? val : new object[]
			{
				arType,
				(arType == 10) ? val.ToString() : val
			}), fieldId == 15u, arType == 6));
		}
		public void Add(uint fieldId, object val)
		{
			this.Add(fieldId, val, Util.GetARType(val));
		}
		public int GetValueType(uint fieldId)
		{
			object val = base.get_Dictionary().get_Item(fieldId);
			return Util.GetARValueType(val);
		}
		public virtual bool Contains(uint fieldId)
		{
			return base.get_Dictionary().Contains(fieldId);
		}
		public virtual bool ContainsKey(uint fieldId)
		{
			return base.get_Dictionary().Contains(fieldId);
		}
		public virtual bool ContainsValue(object value)
		{
			IEnumerator enumerator = base.get_Dictionary().get_Values().GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					object current = enumerator.get_Current();
					if (current == value)
					{
						return true;
					}
				}
			}
			finally
			{
				IDisposable disposable = enumerator as IDisposable;
				if (disposable != null)
				{
					disposable.Dispose();
				}
			}
			return false;
		}
		public virtual void Remove(uint fieldId)
		{
			base.get_Dictionary().Remove(fieldId);
		}
	}
}
